﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FrienDev.BusinessRules;
using FrienDev.Data;

public partial class Public_InviteRegiste : Page
{

    protected string AppId = ApplicationSettings.WindowsLiveLogin.AppId;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["uid"]))
        {
            string userId = Request.QueryString["uid"].Trim();
            Session.Add("InviteUserID", userId);
            User user = UserRules.Instance.GetUserByUserId(userId);
            img_UserLogo.ImageUrl = ApiHelper.Instance.GetUserBigLogoUrl(user.UserId);
            if (!string.IsNullOrEmpty(Request.QueryString["isreg"]))
            {
                Session.Add("IsInviteeRegisted", true);
                lb_Title.Text = user.FullName + "邀请您成为好友";
                lb_Tip.Text = "点击“登录网站”，登录后即可直接与" + user.FullName + "成为好友";
            }
            else
            {
                lb_Title.Text = user.FullName + "邀请您注册clubof.net并且成为好友";
                lb_Tip.Text = "该网站需要您使用LiveID进行登录注册，请点击“登陆网站”以进一步完成操作";
            }
        }
        else
        {
            Response.Redirect("~/Default.aspx");
        }
    }
}
